package com.smartwebx.ha.dal.realtime.dao;

import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.smartwebx.ha.dal.config.OracleConfigInfo;
import com.smartwebx.ha.dal.usebean.RiverFC;

/**
 * 河道站防洪指标表
 * 
 * @author zhangxi
 * 
 */
@CacheNamespace(size = 100)
public interface RiverFloodControlMapper {
	String ST_RVFCCH_B = OracleConfigInfo.REALTIME_NAME + ".ST_RVFCCH_B";

	@Select("SELECT STCD,GRZ savWater,GRQ savFlow,WRZ warWater,WRQ warFlow FROM "
			+ ST_RVFCCH_B
			+ " WHERE WRZ IS NOT NULL OR WRQ IS NOT NULL OR GRZ IS NOT NULL OR GRQ IS NOT NULL")
	public List<RiverFC> getFloodControlInfo();

	@Select("SELECT STCD,GRZ savWater,GRQ savFlow,WRZ warWater,WRQ warFlow FROM "
			+ ST_RVFCCH_B + " WHERE STCD = #{stcd}")
	public RiverFC getFloodControlInfoByStcd(@Param("stcd") String stcd);
}